app.controller("addupdate",function($scope,$http, $stateParams,get){
	$scope.selects=function(){
		var params={
			pageNum:'1',
			pageSize:1000
		}
		//在职状态
		get.list("dictionary/service",params).then(function(e){
				$scope.service = e.list
			})
		//专业
		get.list("dictionary/professional",params).then(function(e){
				$scope.professional = e.list
			})
		//户口性质
		get.list("dictionary/character",params).then(function(e){
				$scope.character = e.list
			})
		
		//岗位
		get.list("dictionary/post",params).then(function(e){
				$scope.post = e.list
			})
		//部门
		get.list("department/all",params).then(function(e){
				$scope.department = e
				console.log($scope.department)
		})
	}
	$scope.selects();
	$scope.add={
		serialNum:null,
		name:null,
		email:null,
		telephone:null,
		officPhone:null,
		pickertime:null,
		pickertimes:null,
		did:null,
		status:null,
		user:null,
		password:null,
		qpassword:null,
		cardId:null,
		sex:null,
		education:null,
		master:null,
		sex:null,
		sex:null,
		sex:null,
		sex:null,
		sex:null,
	}
	$scope.sub=function(val){
		angular.forEach($scope.staff,function(o,vals){
			if(val==vals){
				$scope.staff[vals]=true
			}else{
				$scope.staff[vals]=false
			}
		})
			console.log($scope.add)
	}
	$scope.staff={
		staff:true,
		login:false,
		activen:false
	}
	$scope.isshow=function(val){
		angular.forEach($scope.staff,function(o,vals){
			if(val==vals){
				$scope.staff[vals]=true
			}else{
				$scope.staff[vals]=false
			}
		})
	}
	
})
